//
//  ZYGCDSocketManager.h
//  ZYWebImage
//
//  Created by wangzhipan on 2025/4/23.
//

#import <Foundation/Foundation.h>
#import "ISocketProtocol.h"
NS_ASSUME_NONNULL_BEGIN


@class ZYGCDSocketManager;


@interface ZYGCDSocketManager : NSObject <ISocketProtocol>

// 主机地址
@property (nonatomic, copy, readonly) NSString *host;
// 端口
@property (nonatomic, assign, readonly) NSUInteger port;
// 是否已连接
@property (nonatomic, assign, readonly) BOOL isConnecting;
// 超时时间（默认30秒）
@property (nonatomic, assign) NSTimeInterval timeout;
// 是否自动重连（默认YES）
@property (nonatomic, assign) BOOL autoReconnect;
// 最大重连次数（默认5次）
@property (nonatomic, assign) NSUInteger maxReconnectAttempts;
// 重连延迟时间（默认2秒）
@property (nonatomic, assign) NSTimeInterval reconnectDelay;
// 代理
@property (nonatomic, weak) id<ISocketDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
